package calculator_sample;

public class calculator {
	
	static private double add(double a, double b) {
		return a + b; 
	}
	
	static private double multiply(double a, double b) {
	
		return a * b; 
	}
	
	static private double subtract(double a, double b) {
		return a-b; 
	}
	
	static private double divide(double a, double b) {
		return a/b;	 
}
	
	static public double methic(double a, double b,char init) {
		double result=0;
		switch(init) {
		case '+':
			result = add(a,b);
			break;
		case '-':
			result = subtract(a,b);
			break;
		case '*':
			result = multiply(a,b);
			break;
		case '/':
			result = divide(a,b);
			break;
		default:
			//Through fix
		}
		return result;
	}
}
